#include<stdio.h>
#include<math.h>
int main()
{
	double x,y,A,B,C,d;
	scanf("%lf %lf",&x,&y);
	scanf("%lf %lf %lf",&A,&B,&C);
	d=fabs(A*x+B*y+C)/sqrt(A*A+B*B);
	printf("%lf",d);
	return 0;
}